import { useEffect, useState } from "react";

const useLoginState = ()=>{
    const [isLogin,setIsLogin] = useState(false);
    useEffect(()=>{
        let token = localStorage.getItem("token");
        token ? setIsLogin(true) : setIsLogin(false);
    },[isLogin])
    return isLogin;
}

export default useLoginState;